package com.aijia.custom.product.data;

/**
 * Created by yejianjun on 2019/1/16.
 */

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 工序数据
 */
public class ProcessData implements Parcelable {

    private int id; // 定制产品流程编号
    private String name;    // 流程名称
    private int status; // 流程状态 1取消，2进行中，3完成
    private String finishDate; // 操作时间
    private int staffId; //可操作人编号
    private String staffName; //可操作人名称

    // 无效字段
    private String createDate;
    private String content;
    private String amount;


    public ProcessData() {

    }

    protected ProcessData(Parcel in) {
        id = in.readInt();
        name = in.readString();
        status = in.readInt();
        createDate = in.readString();
        finishDate = in.readString();
        content = in.readString();
        amount = in.readString();
        staffId = in.readInt();
        staffName = in.readString();
    }

    public static final Creator<ProcessData> CREATOR = new Creator<ProcessData>() {
        @Override
        public ProcessData createFromParcel(Parcel in) {
            return new ProcessData(in);
        }

        @Override
        public ProcessData[] newArray(int size) {
            return new ProcessData[size];
        }
    };

    public void setAll(int id, String name, int status, String createDate, String finishDate, String content, String amount, int staffId) {
        this.id = id;
        this.name = name;
        this.status = status;
        this.createDate = createDate;
        this.finishDate = finishDate;
        this.content = content;
        this.amount = amount;
        this.staffId = staffId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getFinishDate() {
        return finishDate;
    }

    public void setFinishDate(String finishDate) {
        this.finishDate = finishDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public int getStaffId() {
        return staffId;
    }

    public void setStaffId(int staffId) {
        this.staffId = staffId;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(name);
        dest.writeInt(status);
        dest.writeString(createDate);
        dest.writeString(finishDate);
        dest.writeString(content);
        dest.writeString(amount);
        dest.writeInt(staffId);
        dest.writeString(staffName);
    }
}
